package com.tarzipdemo.tarzip.controller;/**
 * @author wzj
 * @date 2020/5/10 15:03
 * @version 1.0
 */

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.File;

import static com.tarzipdemo.tarzip.utiles.TarZipUtiles.listFile;

/**
 * auther wzj
 * date 2020/5/10 15:03
 */
@Controller
@RequestMapping("/tarzip")
public class TarZipController {


    @GetMapping
    @ResponseBody
    public String tarZipMethod(String path){
        //文件夹地址
        File dir=new File(path);
        listFile(dir);
        return "解压成功";
    }
}
